package com.web.controller;

import com.web.annotation.LoginRequired;
import com.web.domain.Response;
import com.web.entity.Interest;
import com.web.service.InterestService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * 兴趣
 */
@Slf4j
@RestController
@RequestMapping(value = "/app/Interest")
public class InterestController {
    @Autowired
    private InterestService interestService;


    /**
     * 获取兴趣列表
     * @return
     */
    @LoginRequired
    @PostMapping("/info")
    public Response InterestList(){
        List<Interest> list = interestService.getInterestList();
        return Response.custom().ok().addParams(list);
    }


}
